<!DOCTYPE html>
<html lang="ru">
  <head>
    <!-- <title>Welcome to CareMyBaby!</title> -->
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <script src="https://telegram.org/js/telegram-web-app.js"></script>
    <link rel="stylesheet" href="/styles/index.css" />
    <link rel="stylesheet" href="/styles/mainPage.css" />
    <script src="/checkAuth.js" type="module"></script>
    <script src="/displayBalance.js" type="module"></script>
    <!-- Yandex.Metrika counter -->
    <script type="text/javascript">
      (function (m, e, t, r, i, k, a) {
        m[i] =
          m[i] ||
          function () {
            (m[i].a = m[i].a || []).push(arguments);
          };
        m[i].l = 1 * new Date();
        for (var j = 0; j < document.scripts.length; j++) {
          if (document.scripts[j].src === r) {
            return;
          }
        }
        (k = e.createElement(t)),
          (a = e.getElementsByTagName(t)[0]),
          (k.async = 1),
          (k.src = r),
          a.parentNode.insertBefore(k, a);
      })(
        window,
        document,
        "script",
        "https://mc.yandex.ru/metrika/tag.js",
        "ym"
      );

      ym(97272843, "init", {
        clickmap: true,
        trackLinks: true,
        accurateTrackBounce: true,
        webvisor: true,
      });
    </script>
    <script type="text/javascript">
      (function (e, x, pe, r, i, me, nt) {
        (e[i] =
          e[i] ||
          function () {
            (e[i].a = e[i].a || []).push(arguments);
          }),
          (me = x.createElement(pe)),
          (me.async = 1),
          (me.src = r),
          (nt = x.getElementsByTagName(pe)[0]),
          nt.parentNode.insertBefore(me, nt);
      })(
        window,
        document,
        "script",
        "https://abt.s3.yandex.net/expjs/latest/exp.js",
        "ymab"
      );
      ymab("metrika.97272843", "init" /*, {clientFeatures}, {callback}*/);
    </script>
    <noscript
      ><div>
        <img
          src="https://mc.yandex.ru/watch/97272843"
          style="position: absolute; left: -9999px"
          alt=""
        /></div
    ></noscript>
    <!-- /Yandex.Metrika counter -->
    <!-- <script>
      let tg = window.Telegram.WebApp;
      try {
        tg.initDataUnsafe.user.id;
        // document.getElementById("test").innerHTML = "через телеграм";
      } catch (_) {
        window.location.href = "/accessError/";
        // document.getElementById("test").innerHTML = "через сайт";
      }
    </script> -->
  </head>
  <body>
    <div class="navbar">
      <a class="tab" id="home">
        <img src="/image/house-1.svg" alt="house" />
        <label for="home">Главная</label>
      </a>
      <a class="tab mButton" id="pay" href="/pay/"
        ><img src="/image/wallet2.svg" alt="wallet" />
        <label for="pay">Баланс</label>
      </a>
      <a class="tab mButton" id="schedule" href="/schedule/"
        ><img src="/image/calendar-week.svg" alt="calendar" />
        <label for="schedule">Расписание</label>
      </a>
      <a class="tab" id="item" href="/items/"
        ><img src="/image/mortarboard.svg" alt="mort" />
        <label for="item">Предметы</label>
      </a>
      <a class="tab" id="another" href="/another/"
        ><img src="/image/three-dots.svg" alt="dots" />
        <label for="another">Еще</label>
      </a>
    </div>
    <div class="header">
      <div class="header2">
        <div class="circle">
          <p class="circleName"></p>
        </div>
        <div class="nameHeader">
          <span id="displayName"></span>
          <img src="/image/chevron-right.svg" />
        </div>
      </div>
      <div class="balanceHeader">
        <div style="display: flex; align-items: center">
          <p id="headerRub">0</p>
          <p>₽</p>
        </div>
        <div style="display: flex; align-items: center">
          <p id="headerEuro">0</p>
          <p>€</p>
        </div>
      </div>
    </div>
    <div class="main">
      <!-- <h1 class="classHide">Войдите в личный кабинет CareMyBaby</h1> -->
      <div id="auth" class="classHide">
        <h1>Войдите в личный кабинет CareMyBaby</h1>
        <a href="/auth/"><button class="btn">Авторизация</button></a>
        <!-- <button id="regis">регистрация</button> -->
      </div>
      <!-- <button id="testApiGo">test</button> -->
      <div class="owerFlowWindod"></div>
      <div class="logInWindow classHide">
        <div class="schedule">
          <div class="scheduleHeader">
            <h1 class="logInWindowTitle" id="todaySchedule">
              Расписание на сегодня
            </h1>
          </div>
          <div class="scheduleBody"></div>
          <button id="scheduleMoreButton">
            Все расписание
            <img
              src="/image/arrow_forward_ios_24dp_FILL0_wght600_GRAD0_opsz24 1.svg"
            />
          </button>
        </div>

        <div class="balance">
          <div class="balanceHead">
            <h1 class="logInWindowTitle">Баланс</h1>
            <div class="gift">
              <img src="/image/gift.svg" alt="gift" />
              <p id="BodyBonus"></p>
            </div>
          </div>
          <div class="balanceBody">
            <div class="balanceRub">
              <img src="/image/Group 50.svg" alt="group" />
              <h3 id="displayBobyRub">0</h3>
              <h3>₽</h3>
            </div>
            <div class="balanceEuro">
              <img src="/image/Group 51.svg" alt="group1" />
              <h3 id="displayBodyEuro">0</h3>
              <h3>€</h3>
            </div>
          </div>
          <button id="payLoad">Пополнить</button>
        </div>
      </div>
      <h1>Полезные материалы</h1>
      <div class="material"></div>
    </div>

    <div id="referrer" class="referrer">
      <div class="bPopupContent">
        <div id="zero">
          <img
            src="/image/Union.svg"
            alt="close"
            class="btn-close"
            id="closeBtn1"
          />
        </div>
        <div class="bodyPopUp">
          <h2 id="nameMaterialPopUp"></h2>
          <p id="descriptionPopUp">Описание</p>
          <a id="downLoad" target="_blank"
            ><button type="button">Скачать</button>
          </a>
        </div>
      </div>
    </div>

    <!-- <div class="logOut">
      <button id="logOut" class="btn">кнопка LogOut для теста</button>
    </div> -->
    <script src="./script.js" type="module"></script>
  </body>
</html>
